cmake_minimum_required(VERSION 3.10)

project(svm_train)

set(CMAKE_CXX_STANDARD 17)

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
if (NOT OpenCV_FOUND)
    message(FATAL_ERROR "OpenCV not found")
endif ()

include_directories(${PROJECT_SOURCE_DIR}/include
                    ${OpenCV_INCLUDE_DIRS})

set(SOURCES_Filter
    main/main_filter.cpp
    src/filter.cpp
    src/tinyxml2.cpp
    src/light_detect.cpp
)

set(SOURCES_Train
    main/main_train.cpp    
)

set(SOURCES_Gen
    main/main_generator.cpp
)

add_executable(filter ${SOURCES_Filter})

target_link_libraries(filter ${OpenCV_LIBS})

add_executable(training ${SOURCES_Train})

target_link_libraries(training ${OpenCV_LIBS})

add_executable(gen ${SOURCES_Gen})

target_link_libraries(gen ${OpenCV_LIBS})